package com.org.service.dev;

import com.org.entity.base.PageRequest;
import com.org.entity.base.PageResult;
import com.org.entity.dev.DevDataBackupConfig;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

public interface DevDataBackupConfigService {

    int addDevDataBackupConfigInfo(DevDataBackupConfig devDataBackupConfig);

    int updateDevDataBackupConfigInfo(DevDataBackupConfig devDataBackupConfig);

    int delDevDataBackupConfigInfo(String id);

    int delDevDataBackupConfigList(String ids);

    DevDataBackupConfig getDevDataBackupConfigInfo(String id);

    List<DevDataBackupConfig> getDevDataBackupConfigList(String keyword);

    PageResult<DevDataBackupConfig> getDevDataBackupConfigPageList(String keyword, PageRequest pageRequest);

    /**
     * 查找所有需要备份的表的配置信息
     * @return
     */
    List<DevDataBackupConfig> getAllNeedBackupConfig();

    /**
     * 备份数据接口
     * @param sysDataBackupConfig
     * @return
     */
    @Transactional
    Map<String,Object> backupData(DevDataBackupConfig sysDataBackupConfig);
}
